package rabbitmq

import amqp "github.com/rabbitmq/amqp091-go"

var (
	url = "amqp://admin:admin001@localhost:5672/chang"
	exchange = "my_exchange"
	routeKey = "my_route"
	queueKey = "my_queue"

	//delayExchange = "delay_exchange"
	delayRoute = "delay_route"

	delayQueue1 = "tw10s"
	delayQueue2 = "tw30s"
)


func getChannel() (*amqp.Channel, error) {
	conn, err := amqp.Dial(url)
	if err != nil {
		return nil, err
	}

	mqChl, err2 := conn.Channel()

	if err2 != nil {
		return nil, err2
	}

	return mqChl, nil
}